#include <jni.h>
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#include <gsl/gsl_matrix.h>

#include "Matrix.h"



JNIEXPORT void JNICALL
Java_Matrix_print(JNIEnv *en, jobject obj,jint dept)
{
	printf("Hello World\n");

	gsl_matrix *matrix;

	int k,l;

	matrix  = gsl_matrix_alloc(dept,dept);
	for(k=0;k<dept;k++)
		for(l=0;l<dept;l++)
			gsl_matrix_set(matrix,k,l,rand());
	for(k=0;k<dept;k++)
		{ 
		for(l=0;l<dept;l++)
			printf("%g\t",gsl_matrix_get(matrix,k,l));
		printf("\n\n");
		}

	gsl_matrix_free(matrix);
			

}



